package fr.afcepf.ai85.ent;

// Generated 21 mars 2013 17:20:56 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * PeriodeAbsenceEncadrant generated by hbm2java
 */
@Entity
@Table(name = "periode_absence_encadrant", catalog = "gepeto_db")
public class PeriodeAbsenceEncadrant implements java.io.Serializable {

	private Integer idPlanning;
	private Encadrant encadrant;
	private Date dateDebutAbsence;
	private Date dateFinAbsence;

	public PeriodeAbsenceEncadrant() {
	}

	public PeriodeAbsenceEncadrant(Encadrant encadrant) {
		this.encadrant = encadrant;
	}

	public PeriodeAbsenceEncadrant(Encadrant encadrant, Date dateDebutAbsence,
			Date dateFinAbsence) {
		this.encadrant = encadrant;
		this.dateDebutAbsence = dateDebutAbsence;
		this.dateFinAbsence = dateFinAbsence;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID_PLANNING", unique = true, nullable = false)
	public Integer getIdPlanning() {
		return this.idPlanning;
	}

	public void setIdPlanning(Integer idPlanning) {
		this.idPlanning = idPlanning;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_ENCADRANT", nullable = false)
	public Encadrant getEncadrant() {
		return this.encadrant;
	}

	public void setEncadrant(Encadrant encadrant) {
		this.encadrant = encadrant;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_DEBUT_ABSENCE", length = 10)
	public Date getDateDebutAbsence() {
		return this.dateDebutAbsence;
	}

	public void setDateDebutAbsence(Date dateDebutAbsence) {
		this.dateDebutAbsence = dateDebutAbsence;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_FIN_ABSENCE", length = 10)
	public Date getDateFinAbsence() {
		return this.dateFinAbsence;
	}

	public void setDateFinAbsence(Date dateFinAbsence) {
		this.dateFinAbsence = dateFinAbsence;
	}

}
